﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Resort.aspx.vb" Inherits="ExpWeb.Resort" %>



<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row">
        <div class="col-md-2">
            <h3>Resort</h3>
        </div>
    </div>

    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
            <div class="col-lg-10 col-lg-offset-1">
                   <div class="col-lg-4">
                                <div class="form-group">
                                    <label>Country :</label>
                                    <asp:DropDownList ID="ddlCountrySearch" runat="server" CssClass="form-control"></asp:DropDownList>
                                    </div>
                            </div>
                    <div class="col-lg-4">
                                <div class="form-group">
                                    <label>Brand :</label>
                                    <asp:DropDownList ID="ddlBrandSearch" runat="server" CssClass="form-control"></asp:DropDownList>
                    </div>
                            </div>
                    <div class="col-lg-3">
                                <div class="form-group">
                                    <label>Status :</label>
                                    <asp:DropDownList ID="ddl_StatusSearch" runat="server" CssClass="form-control">
                                        <asp:ListItem Value="1">Active</asp:ListItem>
                                        <asp:ListItem Value="0">InActive</asp:ListItem>
                                    </asp:DropDownList>    
                                </div>
                    </div>
                <div class="col-lg-8 col-lg-offset-5">
                    <asp:LinkButton ID="btn_search" runat="server" OnClick="btnSearch_Click" CssClass="btn btn-default"><span class="glyphicon glyphicon-search"></span> Search</asp:LinkButton>
                 </div>
                </div>
                <div class="row" style="margin-bottom: 5px;">
                <div class="col-lg-12 text-right">
                    <asp:LinkButton ID="btn_Add" runat="server" CommandArgument="View2" CommandName="SwitchViewByID" CssClass="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Add</asp:LinkButton>
                </div>
                </div>
            <div class="row">
                <div class="col-lg-12">
                </div>
            </div>
            <asp:GridView ID="gv_Data" runat="server" DataKeyNames="Resort_ID" Width="100%" AutoGenerateColumns="False" GridLines="None" CssClass="table table-hover">
                <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                <Columns>
                    <asp:TemplateField HeaderText="Edit">
                        <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ToolTip="Edit" CommandName="edit" CommandArgument='<%#Eval("Resort_ID")%>' ID="btnEdit">
                                <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Delete">
                        <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("Resort_ID")%>' ID="btnDelete" OnClientClick="return confirm('Make sure, Delete this one?');">
                                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Detail">
                        <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ToolTip="More Detail" CommandName="detail" CommandArgument='<%#Eval("Resort_ID")%>' ID="btnDetail">
                                <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Resort Name</center>
                        </HeaderTemplate>
                        <ItemStyle Width="15%" VerticalAlign="top" HorizontalAlign="Left" />
                        <ItemTemplate><%# Eval("ResortName")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Brand</center>
                        </HeaderTemplate>
                        <ItemStyle Width="10%" VerticalAlign="top" HorizontalAlign="Left" />
                        <ItemTemplate>
                            <asp:Label ID="lblBrand_ID" runat="server" Text='<%# Eval("Brand_ID")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Status</center>
                        </HeaderTemplate>
                        <ItemStyle Width="8%" VerticalAlign="top" HorizontalAlign="left" />
                        <ItemTemplate>
                            <center><%# IIf(Eval("isActive") = True, "Active", "Inactive")%></center>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Country</center>
                        </HeaderTemplate>
                        <ItemStyle Width="14%" VerticalAlign="top" HorizontalAlign="left" />
                        <ItemTemplate>
                            <asp:Label ID="lblCountry_ID" runat="server" Text='<%# Eval("Country_ID")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Address</center>
                        </HeaderTemplate>
                        <ItemStyle Width="25%" VerticalAlign="top" HorizontalAlign="left" />
                        <ItemTemplate><%# Eval("Address")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <center>Description</center>
                        </HeaderTemplate>
                        <ItemStyle Width="20%" VerticalAlign="top" HorizontalAlign="left" />
                        <ItemTemplate><%# Eval("Description")%></ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </asp:View>


        <asp:View ID="View2" runat="server">

            <div class="col-lg-8 col-lg-offset-2" style="margin-bottom: 50px;">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <asp:Label ID="lblPanelHeader" runat="server" Text="Add/Edit Resort"></asp:Label>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Resort Name :</label>
                                    <asp:TextBox ID="txtResortName" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Brand :</label>
                                    <asp:DropDownList ID="ddl_Brand" runat="server" CssClass="form-control"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Country :</label>
                                    <asp:DropDownList ID="ddl_Country" runat="server" CssClass="form-control"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Status :</label>
                                    <asp:DropDownList ID="ddl_Status" runat="server" CssClass="form-control">
                                        <asp:ListItem Value="1">Active</asp:ListItem>
                                        <asp:ListItem Value="0">InActive</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Address :</label>
                                    <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Description :</label>
                                    <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>

                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Season :</label>
                                    <asp:GridView ID="gv_Data_Season" runat="server" AutoGenerateColumns="False" DataKeyNames="ListData_SeasonID" CssClass="table table-hover" GridLines="Vertical">
                                        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                                        <Columns>
                                            <asp:BoundField DataField="SeasonID" ItemStyle-Width="50" Visible="false" />
                                            <asp:TemplateField HeaderText="Delete">
                                                <HeaderTemplate>
                                                    <center>Delete</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="90px" />
                                                <ItemTemplate>
                                                    <asp:LinkButton runat="server" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("ListData_SeasonID")%>' ID="btnDelete" OnClientClick="return confirm('Make sure, Delete this one?');">
                                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                                                    </asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>Season</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSeasonCode" runat="server" Text='<%# Eval("ListData_SeasonCode")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>Start Date</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblStartDate" runat="server" Text='<%# Eval("ListData_StartDate")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>End Date</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblEndDate" runat="server" Text='<%# Eval("ListData_EndDate")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>

                            <div class="col-lg-3">
                                <div class="form-group">
                                    <label>Add Season :</label>
                                    <asp:DropDownList ID="ddl_Season" runat="server" CssClass="form-control"></asp:DropDownList>
                                </div>
                            </div>

                            <div class="col-lg-3">
                                <div class="form-group has-feedback">
                                    <label>From :</label>
                                    <ajax:CalendarExtender ID="cldJoin_FromDate" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFromDate">
                                    </ajax:CalendarExtender>
                                    <asp:TextBox ID="txtFromDate" runat="server" CssClass="form-control"></asp:TextBox>
                                    <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                                </div>
                            </div>

                            <div class="col-lg-3">
                                <div class="form-group has-feedback">
                                    <label>To :</label>
                                    <asp:TextBox ID="txtToDate" runat="server" CssClass="form-control"></asp:TextBox>
                                    <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                                    <ajax:CalendarExtender ID="txtToDate_CalendarExtender" runat="server" Format="dd/MM/yyyy" TargetControlID="txtToDate">
                                    </ajax:CalendarExtender>
                                </div>
                            </div>

                            <div class="col-lg-3">
                                <div class="form-group">
                                    <asp:Button ID="btn_AddSeason" runat="server" Text="Add Season" CssClass="btn btn-default" Style="margin-top: 25px;" />
                                </div>
                            </div>


                        </div>
                        <asp:HiddenField ID="HDFieldResortID" runat="server" />
                    </div>
                    <div class="panel-footer">
                        <asp:Button ID="btn_Save" runat="server" Text="SAVE" CssClass="btn btn-default" />&nbsp;
                        <asp:Button ID="btn_Cancel" runat="server" CommandArgument="View1" CommandName="SwitchViewByID" Text="Cancel" CssClass="btn btn-default" />
                    </div>
                </div>
            </div>

        </asp:View>
             <asp:View ID="View3" runat="server">
         <div class="col-lg-8 col-lg-offset-2" >
              <asp:Button ID="btnBackView" runat="server" Text="Back" CssClass="btn btn-default" />      
                 </div>
<div class="col-lg-8 col-lg-offset-2" style="margin-bottom:50px;">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <asp:Label ID="Label1" runat="server" Text="Resort Detail"></asp:Label>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Resort ID :</label>
                                    <asp:Label ID="lblResortID" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Resort Name :</label>
                                    <asp:Label ID="lblResortName" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Brand :</label>
                                    <asp:Label ID="lblBrand" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Country :</label>
                                    <asp:Label ID="lblCountry" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Address :</label>
                                    <asp:Label ID="lblAddress" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Description :</label>
                                    <asp:Label ID="lblDescription" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <label>Status :</label>
                                <asp:Label ID="lblStatus" runat="server" CssClass="form-control-static"></asp:Label> 
                            </div>
                            <div class="col-lg-4">                          
                                <div class="form-group">
                                    <label>Update Date :</label>
                                    <asp:Label ID="lblUpdateDate" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <label>Update User :</label>
                                    <asp:Label ID="lblUpdateUser" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                        </div>
<div class="col-lg-8 col-lg-offset-2" >
                                <div class="form-group">
                                    <label>Season :</label>
                                    <asp:GridView ID="gv_Data_Season_View" runat="server" AutoGenerateColumns="False" DataKeyNames="ListData_SeasonID" CssClass="table table-hover" GridLines="Vertical">
                                        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                                        <Columns>
                                            <asp:BoundField DataField="SeasonID" ItemStyle-Width="50" Visible="false" />
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>Season</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSeasonCode" runat="server" Text='<%# Eval("ListData_SeasonCode")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>Start Date</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblStartDate" runat="server" Text='<%# Eval("ListData_StartDate")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>
                                                    <center>End Date</center>
                                                </HeaderTemplate>
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="top" Width="150px" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblEndDate" runat="server" Text='<%# Eval("ListData_EndDate")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        <asp:HiddenField ID="HDFieldUnitID" runat="server" />
                    </div>
                    
                </div>
            </div>

    </asp:View>
    </asp:MultiView>

</asp:Content>
